package com.maila.calltaxi_driver.ui;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

import com.maila.calltaxi_driver.R;
import com.maila.calltaxi_driver.adapter.OrderRecodeAdapter;
import com.maila.calltaxi_driver.utils.StartActivityUtils;
import com.maila.calltaxi_driver.view.NoScrollListView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/7/6.
 */

public class WalletActivity extends AppCompatActivity {
    @BindView(R.id.tv_total_money)
    TextView tvTotalMoney;
    @BindView(R.id.tv_today_num)
    TextView tvTodayNum;
    @BindView(R.id.tv_week_num)
    TextView tvWeekNum;
    @BindView(R.id.tv_month_num)
    TextView tvMonthNum;
    @BindView(R.id.tv_maidou_num)
    TextView tvMaidouNum;
    @BindView(R.id.lv_order)
    NoScrollListView lvOrder;
    OrderRecodeAdapter orderRecodeAdapter;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.wallet_activity);
        ButterKnife.bind(this);
        orderRecodeAdapter=new OrderRecodeAdapter(this);
        lvOrder.setAdapter(orderRecodeAdapter);
    }

    @OnClick({R.id.return_iv, R.id.btn_download_maila, R.id.btn_change,R.id.btn_load_more})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.return_iv:
                finish();
                break;
            case R.id.btn_download_maila:
                Intent intent=new Intent();
                intent.setAction(Intent.ACTION_VIEW);
                intent.setData(Uri.parse("http://121.42.175.160/download.php"));
                startActivity(intent);
                break;
            case R.id.btn_change:
                break;
            case  R.id.btn_load_more:
                StartActivityUtils.start(this,OrderRecodeActivity.class);
                break;
        }
    }
}
